package com.summer.spring;

import com.summer.spring.bean.ConsumerBean;
import com.summer.spring.bean.ProviderBean;
import com.summer.spring.bean.ServerBean;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;

/**
 * @author summer
 * @date 2020/10/12 - 18:50
 */
public class RpcNamespaceHandler extends NamespaceHandlerSupport {
    @Override
    public void init() {
        registerBeanDefinitionParser("consumer", new RpcBeanDefinitionParser(ConsumerBean.class));
        registerBeanDefinitionParser("provider", new RpcBeanDefinitionParser(ProviderBean.class));
        registerBeanDefinitionParser("server", new RpcBeanDefinitionParser(ServerBean.class));
    }
}
